<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Welcome</title>
    <link rel="stylesheet" type="text/css" href="static/css/welcome.css" />
</head>
<body>
<div class="top">
    <%if(session.getAttribute("flag")!=null){// session被设置过，正常登陆过%>
    <div class="title">
        <h1><a href="./welcome.jsp">Welcome</a></h1>
    </div>
    <div class="user">

        <a ><%=session.getAttribute("name") %></a>
        <span><a>|</a></span>
        <a href="logout.jsp">退出</a>
    </div>

    <div class="content">
    </div>

    <div class="bottom">
        <center>欢迎访问本站，当前网站登录总人次为<%=application.getAttribute("count") %>。</center>
    </div>
</div>
<%}else{
    response.setHeader( "refresh", "5;URL=login.jsp"); %>
<center><h3>请先登陆！5秒后将转跳到<a href="login.jsp">登录页</a></h3></center>
</div>
<%}%>

</body>
</html>